module(
    name = "j2cl",
    version = "v20250618",
    bazel_compatibility = [">=8.3.1"],
)

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "bazel_worker_java", version = "0.0.5")
bazel_dep(name = "google_bazel_common", version = "0.0.1")
bazel_dep(name = "protobuf", version = "31.0")
bazel_dep(name = "rules_closure", version = "0.15.0")
bazel_dep(name = "rules_java", version = "8.13.0")
bazel_dep(name = "rules_kotlin", version = "1.9.6")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_python", version = "1.4.1")
bazel_dep(name = "rules_webtesting", version = "0.4.1")
bazel_dep(name = "rules_cc", version = "0.0.17")

# Maven dependencies.

bazel_dep(name = "rules_jvm_external", version = "6.6")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
    artifacts = [
        "args4j:args4j:2.33",
        "com.google.j2objc:j2objc-annotations:1.3",
        "com.google.escapevelocity:escapevelocity:jar:1.1",
        "com.google.code.gson:gson:2.10.1",
        "org.eclipse.jdt:org.eclipse.jdt.core:jar:3.22.0",
        "org.eclipse.platform:org.eclipse.equinox.common:jar:3.12.0",
    ],
)
use_repo(maven, "maven")

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "com_google_jsinterop_annotations-j2cl",
    sha256 = "b91c16cccf3af0c0d8c084f32f9f5606359b74fec6edf7acfe1112556bbb1d1b",
    strip_prefix = "jsinterop-annotations-7f74f35dae9016c0f244d3484c8e17b1bc6ddf4a",
    urls = ["https://github.com/google/jsinterop-annotations/archive/7f74f35dae9016c0f244d3484c8e17b1bc6ddf4a.zip"],
)

http_archive(
    name = "com_google_binaryen",
    build_file = "@j2cl//build_defs/internal_do_not_use/binaryen:BUILD.binaryen",
    patch_args = ["-p1"],
    patches = ["@j2cl//build_defs/internal_do_not_use/binaryen:generate_intrinsics.patch"],
    sha256 = "a3b0c6b4884cd147913088817f6e238e700394834a7cbd8610acd6b23bdd4860",
    strip_prefix = "binaryen-6645f0c05b8e9268f35742bb6b0a67e0a9c40795",
    url = "https://github.com/WebAssembly/binaryen/archive/6645f0c05b8e9268f35742bb6b0a67e0a9c40795.zip",
)

# Dependencies needed for development.

bazel_dep(name = "rules_shell", version = "0.4.1", dev_dependency = True)
